import { createApp } from 'vue'//导入createApp方法
import App from './App.vue'//导入根组件

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'//👆导入element-plus系列

import  '@arcgis/core/assets/esri/themes/light/main.css'
import esriConfig from '@arcgis/core/config'
esriConfig.portalUrl="https://ws8575.club/web"//👆导入arcgis api样式表并配置portal地址

 
import {createRouter,createWebHashHistory} from 'vue-router'//导入两个路由相关的方法
import Home from './components/Home/Home.vue'//导入Home组件
import 二三维视图联动 from './components/视图/二三维视图联动.vue'
import 二三维视图切换 from './components/视图/二三维视图切换.vue'
import 切换3D视图天气 from './components/视图/切换3D视图天气.vue'
import 显示当前坐标 from './components/视图/显示当前坐标.vue'
import 移动视点 from './components/视图/移动视点.vue'
import 第三人称漫游 from './components/视图/第三人称漫游.vue'
import 加载天地图 from './components/地图与图层/加载天地图.vue'
import 使用图形图层 from './components/地图与图层/使用图形图层.vue'
import 客户端要素图层 from './components/地图与图层/客户端要素图层.vue'
import 要素信息模板 from './components/地图与图层/要素信息模板.vue'
import 动作按钮 from './components/地图与图层/动作按钮.vue'
import 更新要素属性 from './components/地图与图层/更新要素属性.vue'
import 更新要素几何 from './components/地图与图层/更新要素几何.vue'
import 删除要素 from './components/地图与图层/删除要素.vue'
import 点击事件触发信息窗口 from './components/信息窗口/点击事件触发信息窗口.vue'
import 弹出自定义信息窗口 from './components/信息窗口/弹出自定义信息窗口.vue'
import Home小部件 from './components/小部件/Home小部件.vue'
import Sketch小部件 from './components/小部件/Sketch小部件.vue'
import LayerList小部件 from './components/小部件/LayerList小部件.vue'
import Measurement小部件 from './components/小部件/Measurement小部件.vue'
import Editor小部件 from './components/小部件/Editor小部件.vue'
import Legend小部件 from './components/小部件/Legend小部件.vue'
import 基于几何查询 from './components/查询/基于几何查询.vue'
import 基于条件查询 from './components/查询/基于条件查询.vue'
import 统计查询 from './components/查询/统计查询.vue'
import 分组统计查询 from './components/查询/分组统计查询.vue'
import 参考系统的转换 from './components/客户端几何处理/参考系统的转换.vue'
import 计算长度和面积 from './components/客户端几何处理/计算长度和面积.vue'
import 缓冲区分析 from './components/客户端几何处理/缓冲区分析.vue'
import 图形切割 from './components/客户端几何处理/图形切割.vue'
import 反向裁剪 from './components/客户端几何处理/反向裁剪.vue'
import 相交分析 from './components/客户端几何处理/相交分析.vue'
import 点符号_2D from './components/符号/点符号_2D.vue'
import 线符号_2D from './components/符号/线符号_2D.vue'
import 面符号_2D from './components/符号/面符号_2D.vue'
import 文字符号与标注_2D from './components/符号/文字符号与标注_2D.vue'
import 点符号_icon_3D from './components/符号/点符号_icon_3D.vue'
import 点符号_object_3D from './components/符号/点符号_object_3D.vue'
import 多面体符号_3D from './components/符号/多面体符号_3D.vue'
import 文字符号与标注_3D from './components/符号/文字符号与标注_3D.vue'
import 简单符号渲染器 from './components/渲染器/简单符号渲染器.vue'
import 唯一值符号渲染器 from './components/渲染器/唯一值符号渲染器.vue'
import 分级符号渲染器 from './components/渲染器/分级符号渲染器.vue'
import 饼型图表渲染器 from './components/渲染器/饼型图表渲染器.vue'

const router=createRouter({//创建路由对象
    history:createWebHashHistory(),
    routes:[//路由映射数组
        {path:'/' , component:Home},
        {path:'/Home' , component:Home},
        {path:'/二三维视图联动',component:二三维视图联动},
        {path:'/二三维视图切换',component:二三维视图切换},
        {path:'/切换3D视图天气',component:切换3D视图天气},
        {path:'/显示当前坐标',component:显示当前坐标},
        {path:'/移动视点',component:移动视点},
        {path:'/第三人称漫游',component:第三人称漫游},
        {path:'/加载天地图',component:加载天地图},
        {path:'/使用图形图层',component:使用图形图层},
        {path:'/客户端要素图层',component:客户端要素图层},
        {path:'/要素信息模板',component:要素信息模板},
        {path:'/动作按钮',component:动作按钮},
        {path:'/更新要素属性',component:更新要素属性},
        {path:'/更新要素几何',component:更新要素几何},
        {path:'/删除要素',component:删除要素},
        {path:'/点击事件触发信息窗口',component:点击事件触发信息窗口},
        {path:'/弹出自定义信息窗口',component:弹出自定义信息窗口},
        {path:'/Home小部件',component:Home小部件},
        {path:'/Sketch小部件',component:Sketch小部件},
        {path:'/LayerList小部件',component:LayerList小部件},
        {path:'/Measurement小部件',component:Measurement小部件},
        {path:'/Editor小部件',component:Editor小部件},
        {path:'/Legend小部件',component:Legend小部件},
        {path:"/基于几何查询",component:基于几何查询},
        {path:'/基于条件查询',component:基于条件查询},
        {path:'/统计查询',component:统计查询},
        {path:'/分组统计查询',component:分组统计查询},
        {path:'/参考系统的转换',component:参考系统的转换},
        {path:'/计算长度和面积',component:计算长度和面积},
        {path:'/缓冲区分析',component:缓冲区分析},
        {path:'/图形切割',component:图形切割},
        {path:'/反向裁剪',component:反向裁剪},
        {path:'/相交分析',component:相交分析},
        {path:'/点符号_2D',component:点符号_2D},
        {path:'/线符号_2D',component:线符号_2D},
        {path:'/面符号_2D',component:面符号_2D},
        {path:'/文字符号与标注_2D',component:文字符号与标注_2D},
        {path:'/点符号_icon_3D',component:点符号_icon_3D},
        {path:'/点符号_object_3D',component:点符号_object_3D},
        {path:'/多面体符号_3D',component:多面体符号_3D},
        {path:'/文字符号与标注_3D',component:文字符号与标注_3D},
        {path:'/简单符号渲染器',component:简单符号渲染器},
        {path:'/唯一值符号渲染器',component:唯一值符号渲染器},
        {path:'/分级符号渲染器',component:分级符号渲染器},
        {path:'/饼型图表渲染器',component:饼型图表渲染器}
    ]
})

const app=createApp(App)//基于根组件创建实例对象
for (const [key,component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key,component)
}//实例对象创建后,批量导入element-plus组件,导入后在所有组件中无需再次导入

app.use(ElementPlus)
app.use(router)
app.mount('#app')//挂载实例到DOM节点

